import { Injectable } from '@angular/core';
import { HttpClient } from '../../../providers/httpClient';
import { Config } from '../../../providers/config';

@Injectable()
export class WorkIndexService {
  constructor(public httpClient: HttpClient,
    public config: Config) {
  }

  /**
   * [getUSPAthority 获取员工权限]
   * @param
   */
  getUSPAthority(login_nm) {
    let postBody = {
      "module": "KSB",
      "method": "USP_A02_0100",
      "type": "USP",
      "format": "json",
      "params": {
        login_nm: login_nm
      }
    };
    return this.httpClient.post(postBody, {
      isShowLoading: false
    });
  }

  editMenu(data) {
    let postBody = {
      "content": data
    };
    return this.httpClient.post(postBody, {
      url: this.config.server + "api/v1/common/menu/edit"
    });
  }

}
